<template>
  <div>
    <login v-if="loginMode=='login'"></login>
    <cpLogin v-if="loginMode=='cpLogin'"></cpLogin>
    <cp-loginpz v-if="loginMode=='cpLoginpz'"></cp-loginpz>
  </div>
</template>
<script>
import cpLogin from './cplogin'
import cpLoginpz from './cploginpz'
import login from './login'

export default {
  name: 'Login',
  components: {
    cpLogin,
    login,
    cpLoginpz
  },
  data() {
    return {
      loginMode: ""
    }
  },
  created() {
    this.init();
  },
  methods: {
    init() {
      let params = this.$route.query
      if (params.cpinfo) {
        this.loginMode = "cpLogin";
      }else if(params.cpinfonew){
        this.loginMode = "cpLoginpz";
      }else {
        this.loginMode = "login";
      }
    },
  }
}
</script>
